Avoid a string copy
authorMatthias Clasen <mclasen@redhat.com>
Mon, 7 Sep 2015 15:34:08 +0000 (11:34 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 7 Sep 2015 15:36:36 +0000 (11:36 -0400)
We have an api to create a quark from a static string, lets use it.

gtk/gtkcssstaticstyle.c

index ab7e76ef75ac8509ec3111da79faba1abebdf344..34563e01572e7d71d9d15976d4dc1e051ca37b96 100644 (file)
@@ -149,7 +149,7 @@ gtk_css_static_style_get_default (void)
   GtkCssStyle *result;
 
   if (style_quark == 0)
-    style_quark = g_quark_from_string ("gtk-default-style");
+    style_quark = g_quark_from_static_string ("gtk-default-style");
 
   settings = gtk_settings_get_for_screen (gdk_screen_get_default ());
   result = g_object_get_qdata (G_OBJECT (settings), style_quark);